package com.ioc.business.order.vo.receive;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ioc.business.order.enums.OrderStatusEnum;
import com.ioc.common.core.domain.vo.BaseVo;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * 收货订单表
 * </p>
 *
 * @author WeiZhongRong
 * @since 2025-01-07
 */
@Data
public class ReceiveOrderPageVo extends BaseVo {
    /**
     * 收货订单ID
     */
    private Long receiveOrderId;

    /**
     * 单号
     */
    private String orderCode;

    /**
     * 客户名称
     */
    private String customerName;

    /**
     * 物料名称
     */
    private String materialName;

    /**
     * 描述
     */
    private String desc;

    /**
     * 物料数量
     */
    private Integer materialQuantity;

    /**
     * 重量(吨)
     */
    private String weight;

    /**
     * 到货时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date receiveTime;

    /**
     * 预计完成时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date estimatedFinishTime;

    /**
     * 负责人
     */
    private String principal;

    /**
     * 任务进度
     */
    private String taskProgress;

    /**
     * 收货状态
     */
    private OrderStatusEnum receiveStatus;

    /**
     * 收货状态名称
     */
    private String receiveStatusName;

    public void setReceiveStatus(OrderStatusEnum receiveStatus) {
        this.receiveStatus = receiveStatus;
        this.receiveStatusName = OrderStatusEnum.getDesc(receiveStatus);
    }
}
